/**
 * Hunan Jiao Tai Technology Co., Ltd.
 * The code belongs to the company and can not be used in other ways
 * Created by the company's technical personnel.
 * Ownership is the responsibility of the company's technology department.
 **/

package com.shop.common.enums.System;

import lombok.Getter;

import java.io.Serializable;

/**
 * 系统参数皮遏制枚举类
 *
 **/
@Getter
public enum NewSystemConfigEnum implements Serializable {

    DELIVERY_GOODS_SEND_INTEGRAL("integral", "delivery_goods_send_integral","发货赠送积分"),
    PAY_CARD_SEND_INTEGRAL_RATE("integral", "pay_card_send_integral_rate","刷卡赠送积分比例（%）"),
    INTEGRAL_SHOPPING_BACK_RATE("integral", "integral_shopping_back_rate","积分商品消费返积分比例（%）"),
    RECOMMEND_MEMBER_SEND_INTEGRAL("integral", "recommend_member_send_integral","新用户拼团首单返积分"),
    PINK_SUCCESS_SEND_INGEGRAL("integral", "pink_success_send_ingegral","推荐用户拼团成功返积分（首单）"),
    AUTH_SUCCESS_SEND_SPREAD_INGEGRAL("integral", "auth_success_send_spread_ingegral","实名认证成功推荐人赠送积分"),
    WATCH_VIDEOS_INTEGTRAL("integral", "watch_videos_integral","看视频获得积分"),


    USER_SING_IN_ONE("integral_sign", "user_sign_in_one","第一天签到获得积分"),
    USER_SING_IN_TWO("integral_sign", "user_sign_in_two","第二天签到获得积分"),
    USER_SING_IN_THREE("integral_sign", "user_sign_in_three","第三天签到获得积分"),
    USER_SING_IN_FOUR("integral_sign", "user_sign_in_four","第四天签到获得积分"),
    USER_SING_IN_FIVR("integral_sign", "user_sign_in_five","第五天签到获得积分"),
    USER_SING_IN_SIX("integral_sign", "user_sign_in_six","第六天签到获得积分"),
    USER_SING_IN_SEVEN("integral_sign", "user_sign_in_seven","第七天签到获得积分"),
    ;

    private String category;
    private String code;
    private String remark;

    NewSystemConfigEnum(String category, String code, String remark) {
        this.category = category;
        this.code = code;
        this.remark = remark;
    }

    public static NewSystemConfigEnum val(String key) {
        for (NewSystemConfigEnum enumObj : NewSystemConfigEnum.values()) {
            if(enumObj.code.equals(key)) {
                return enumObj;
            }
        }
        return null;
    }


}
